#include "PulseDelaySimul.h"

#include "TrajSimul.h"
#include "PulseDelaySave.h"

PulseDelaySimul::PulseDelaySimul()
{

}

PulseDelaySimul::~PulseDelaySimul()
{

}

MultiLayer PulseDelaySimul::solve(Clock clock,Output output,Pulse *field,Pulse *current,MultiLayer multiLayer,NewParameters params)
{
  MultiLayer result=multiLayer;
  for(current->setDelay(params.getDoublePulse()["delayMin"]);current->getDelay()<params.getDoublePulse()["delayMax"];current->setDelay(current->getDelay()+params.getDoublePulse()["delayStep"]))
    {
      output.setSave(false);
      result=TrajSimul().solve(clock,output,field,current,multiLayer,params);
      PulseDelaySave().save(output,current,result);
    }
  return multiLayer;
}
